package 笔试.HF;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author:谢君臣
 * @Date:2021/7/24-19:21
 * @version:1.0
 * @function:
 */
public class HF_DD1 {

    private static AtomicInteger atomicInteger=new AtomicInteger();
    public static void main(String[] args){
        A a=new A();
        try{
            atomicInteger.wait();
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        a.start();
    }

    static class A extends  Thread{
        @Override
        public void run(){
            atomicInteger.notify();
            atomicInteger.lazySet(1);
            System.out.println(atomicInteger.get());
        }
    }
}
